import * as echarts from 'echarts';
type EChartsOption = echarts.EChartsOption;

export default function pieOption(myChart:echarts.ECharts){
  return {
    title: {
      text: 'Pie Chart',
      subtext: 'Fake Data',
      left: 'center'
    },
    tooltip: {
      trigger: 'item'
    },
    // legend: {
    //   orient: 'vertical',
    //   left: 'left'
    // },
    series: [
      {
        name: '一天的时间分布',
        type: 'pie',
        radius: '55%',
        top:"30",
        data: [
          { value: 1048, name: '睡觉' },
          { value: 735, name: '吃饭' },
          { value: 580, name: '玩手机' },
          { value: 484, name: '看电视' },
          { value: 300, name: '吃零食' }
        ],
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      }
    ]
  } as EChartsOption;
}
  
  